package com.qujia.station.utils;

import java.util.Arrays;

/**
 * @Author GW
 * @Version 1.0
 * @Description
 * @since 2020/12/12 15:12
 */
public enum SignCreatorEnums {
    /**
     * 创造者
     */
    SHA_256_SIGN("SHA256", "sha256SignCreator");

    private String key;

    private String creator;

    SignCreatorEnums(String key, String creator) {
        this.key = key;
        this.creator = creator;
    }

    public String getKey(){
        return key;
    }

    public String getCreator() {
        return creator;
    }

    public static SignCreatorEnums getEnum(String key){
       SignCreatorEnums[] items= SignCreatorEnums.values();
        return Arrays.stream(items).filter(item->item.getKey().equals(key)).findFirst().orElse(null);
    }
}
